package cn.cdiothree.util;

import cn.cdiothree.vo.ResultVo;

/**
 * 结果VO配置
 * @author cumthing
 */
public class ResultVoUtil {

    public  static ResultVo success(Object object){
        ResultVo resultVO =new ResultVo();
        resultVO.setData(object);
        resultVO.setCode(0);
        resultVO.setMsg("成功");
        return resultVO;
    }

    public static ResultVo success(){
        return success(null);
    }

    public static ResultVo error(Integer code, String msg){
        ResultVo resultVO=new ResultVo();
        resultVO.setCode(code);
        resultVO.setMsg(msg);
        return resultVO;
    }
}
